-
Notifications
You must be signed in to change notification settings - Fork 767
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for PodProbeMarker http/tcp capacities #1321
Support for PodProbeMarker http/tcp capacities #1321
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Signed-off-by: ntishchauhan0022 <[email protected]>
263a0de
to
52608b6
Compare
@@ -44,6 +44,7 @@ | |||
"k8s.io/apimachinery/pkg/util/wait" | |||
"k8s.io/apimachinery/pkg/watch" | |||
v1core "k8s.io/client-go/kubernetes/typed/core/v1" | |||
runtimeclient "sigs.k8s.io/controller-runtime/pkg/client" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gofmt: File is not gofmt
-ed with -s
ℹ️ Expand to see all @sonatype-lift commands
You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.
Command | Usage |
---|---|
@sonatype-lift ignore |
Leave out the above finding from this PR |
@sonatype-lift ignoreall |
Leave out all the existing findings from this PR |
@sonatype-lift exclude <file|issue|path|tool> |
Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file |
Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nitishchauhan0022 you need resolve the gofmt check.
@@ -407,6 +411,25 @@ func (c *Controller) fetchLatestPodContainer(podUID, name string) (*runtimeapi.C | |||
return containerStatus, err | |||
} | |||
|
|||
func (c *Controller) fetchPodIp(podUID, name, namespace string) (string, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Our internal cluster is quite large and there are performance issues if Daemon needs to watch Pod resources, so it is recommended that Pod IP can be passed down directly from the NodePodProbeSpec resource.
if p.Exec != nil { | ||
return pb.exec.Probe(pb.newExecInContainer(containerID, p.Exec.Command, timeout)) | ||
} | ||
|
||
// for probing using tcp method | ||
if p.TCPSocket.Port.IntVal != 0 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can refer the kubernetes implement, https://github.com/kubernetes/kubernetes/blob/master/pkg/kubelet/prober/prober.go#L143
Thanks @zmberg for reviewing, I will make the changes as per the feedback. |
@nitishchauhan0022 Can you join kruise dingding to communicate with me? |
@nitishchauhan0022: PR needs rebase. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Ⅰ. Describe what this PR does
Support for PodProbeMarker http/tcp capacities
Ⅱ. Does this pull request fix one issue?
fixes #1306
Ⅲ. Describe how to verify it
Ⅳ. Special notes for reviews